package com.stone.framework.message.user;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import com.stone.framework.message.SortableBody;

import io.swagger.annotations.ApiModelProperty;

public class UserPageReqBody extends SortableBody {

    @ApiModelProperty(value = "用户名")
    private String name;

    @ApiModelProperty(value = "用户姓名")
    private String cname;

    @ApiModelProperty(value = "部门号")
    private String deptCode;

    @ApiModelProperty(value = "状态：DISABLED|ENABLED")
    @Pattern(regexp = "(DISABLED|ENABLED)", message = "[state] must be 'DISABLED|ENABLED'")
    private String state;

    @Override
    @ApiModelProperty(value = "排序：createDate|updateDate|name", required = true)
    @NotNull(message = "[orderBy] {title.notNull}")
    @Pattern(regexp = "(createDate|updateDate|name)", message = "[orderBy] must be 'createDate|updateDate|name'")
    public String getOrderBy() {
        return super.getOrderBy();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public String getDeptCode() {
        return deptCode;
    }

    public void setDeptCode(String deptCode) {
        this.deptCode = deptCode;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

}
